<?php

class Application_Form_ClientePesq extends Zend_Form
{

    public function init()
    {
        $this->setName("pesqcliente");
        $this->setMethod(Zend_Form::METHOD_POST);
        
        //NOME
        $nome = new Zend_Form_Element_Text('nome');
        $nome  ->setLabel('Nome:')
        ->setRequired(false)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator(new Zend_Validate_NotEmpty());
        
        $this->addElement($nome);
        
        //CPF CNPJ
        $cpfCnpj = new Zend_Form_Element_Text('cpfCnpj');
        $cpfCnpj->setLabel('CPF/CNPJ:')
        ->setRequired(false)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator(new Zend_Validate_Int());
        
        $this->addElement($cpfCnpj);
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel("Consultar Cliente");
        
        $this->addElement($submit);
    }


}

